//
//  MQMusicDetailCell.m
//  MQ
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 徐永祥. All rights reserved.
//

#import "MQMusicDetailCell.h"

@implementation MQMusicDetailCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
//        _showLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 5, 60)];
//        _showLabel.backgroundColor = [UIColor clearColor];
//        [self.contentView addSubview:_showLabel];
        
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, SCREEN_WIDTH -10, 30)];
        [self.contentView addSubview:_nameLabel];
        
        _authorLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, SCREEN_WIDTH - 10, 20)];
        _authorLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_authorLabel];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)configureCellWithModel:(MQMusicDetailModel *)model{
    _nameLabel.text = model.song_name;
    _authorLabel.text = model.singer_name;
    if (model.isSelected) {
        _showLabel.backgroundColor = [UIColor greenColor];
    }else{
        _showLabel.backgroundColor = [UIColor whiteColor];
    }
}

@end
